Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Could anyone see whats wrong with my vip gamepass door?

Asked by 3 years ago
Humanoid.Touched.Health = (Function(Hit) = 0 if
HUmanoid.MarketPlaceService.Gamepass (id) if
GamePassOwned.Humanoid.Health = 100 if
GamepassnotOwned.humanoid.Health = 0 If 
GamepassOwned.CanCollide = false
GamepassNotOwned.Cancollide = true

1 answer

Log in to vote
0
Answered by
MattVSNNL 620 Moderation Voter
3 years ago

Try this code

local vipDoor = game.Workspace:FindFirstChild("VipDoor")

local MarketPlaceService = game:GetService("MarketplaceService")

local id = 0000000 -- Put your VIP gamepass id here

game:GetService("Players").PlayerAdded:Connect(function(player)

    if MarketPlaceService:UserOwnsGamePassAsync(player, id) then
        vipDoor.Transparency = 0.75
        vipDoor.CanCollide = false
    else
        vipDoor.Transparency = 0
        vipDoor.CanCollide = true
    end

end)
0
12:07:07.912 Unable to cast Instance to int64 it gives me this error Ilands_master222 17 — 3y
0
You gotta set the local id to your VIP gamepass id MattVSNNL 620 — 3y
Ad

Answer this question